function nicegraph = nicegraph(parms)

stop = false; % This function does not stop the solver
%switch state
 %   case 'init'
        
        setup_states;

        beliefparms.theta=parms(3:9);
        beliefparms.gamma=parms(10);
        beliefparms.gamma_mod=parms(2); % only for robustness

        % theta=parms(3:end-4);
        % gamma=parms(end-3);
    
         fixedparms.ind_goodgirl=1;
         pi = makepi(states,fixedparms,beliefparms);
         fixedparms.ind_goodgirl=0;
         pi_bad = makepi(states,fixedparms,beliefparms);
        
     figure;
for e = 7:13
     f = find(states(:,2)==e);
     plot(states(f, 1), pi(f, 2),'LineWidth',1.5);
     hold on
end



set(gca, 'FontSize', 14)
set(gca,'FontName','Times')

xlabel("Age", 'FontSize', 14)
ylabel("Probability of High Offer", 'FontSize', 14)
axis([12 22 0 0.42])
legend("Grade 7","Grade 8","Grade 9","Grade 10","Grade 11", ...
            "Grade 12","College", 'Location','northwest')
hold off
    
    drawnow
    
    
    end